//
//  NetworkTools.m
//  weibo
//
//  Created by hp on 16/4/28.
//  Copyright © 2016年 hp. All rights reserved.
//

#import "NetworkTools.h"
static NetworkTools *instance = nil;
@implementation NetworkTools
+ (instancetype)sharedNetworkTools
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        NSURL *url = [NSURL URLWithString:@"https://api.weibo.com/"];
        instance = [[NetworkTools alloc] initWithBaseURL:url];
    });
    return instance;
}

- (instancetype)initWithBaseURL:(NSURL *)url
{
    if (self = [super initWithBaseURL:url]) {
        self.responseSerializer = [AFHTTPResponseSerializer serializer];
    }
    return self;
}
@end
